package com.example.module_member.viewmodel

import androidx.lifecycle.MutableLiveData

import com.yuwei.base.BaseViewModel
import com.yuwei.http.ApiService
import com.yuwei.http.entity.MemberEntity
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.launch
import javax.inject.Inject

@HiltViewModel
class MemberViewModel @Inject constructor(
    val apiService: ApiService
):BaseViewModel(){
    val getMemberSuccess by lazy { MutableLiveData<MemberEntity>() }
    fun MemberManage(userId:Int){
        executeNetwork(
            { apiService.getMember(userId) },
            getMemberSuccess::postValue
        )
    }
}